<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>头部导航栏</title>
  	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  	<meta name="keywords" content="fly,layui,前端社区">
  	<meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
  	<link rel="stylesheet" href="../res/layui/css/layui.css">
  	<link rel="stylesheet" href="../res/css/global.css">
	<script src="../res/layui/layui.js"></script>
  </head>
  
  <body style="overflow-y: hidden">	<!-- 去掉竖直滚动条 -->
    <!-- 头部导航栏 -->
	<div class="header">
	  <div class="main">
	    <a class="logo" href="showAllPost" title="网博" target="myIframe">网博社区</a>
	    <div class="nav">
	      <a class="nav-this" href="showAllPost" target=myIframe>
	        <i class="iconfont icon-wenda"></i>问答
	      </a>
	    </div>
	    
		    <div class="nav-user">
	    <c:if test="${User.userName != null }">	<!-- 用户登录后显示 -->
		      <!-- 登入后的状态 -->
		      <a class="avatar" href="showUserHome" target="myIframe">
		        <img src="../res/images/avatar/11.jpg">
		        <cite>${User.userName }</cite>
		        <c:if test="${right == 2 }">	<!-- 是否为VIP用户 -->
		        	<i>VIP</i>
		        </c:if>
		      </a>
		      <div class="nav">
		        <a href="user/set.jsp" target="myIframe"><i class="iconfont icon-shezhi"></i>设置</a>
		        <a href="logout" onclick="return confirm('确认退出${User.userName }？')"><i class="iconfont icon-tuichu" style="top: 0; font-size: 22px;"></i>退了</a>
		      </div>
	    </c:if>
		    </div>
	    
	  </div>
	</div>
  </body>
</html>
